Logo
Python Snacks
Logo
Articles
Advertise
Contact
Books
Sign Up
Logo
Python Snacks
Logo
Articles
Advertise
Contact
Books
Sign Up

error handling

Try/except, raising errors, custom exceptions.


Master Python Functions: From Basics to Power Features

Master Python Functions: From Basics to Power Features

A Deep Dive into Python’s Most Essential Building Block

Aug 27, 2025

•

7 min read

Introduction to Python's argparse library

Introduction to Python's argparse library

Understanding Command-Line Arguments in Python

Aug 23, 2025

•

7 min read

The Top 8 Python Pandas Operations You Should Know

The Top 8 Python Pandas Operations You Should Know

Using the go-to framework for data manipulation

Aug 20, 2025

•

7 min read

Automating YAML File Updates with Jinja Templates

Automating YAML File Updates with Jinja Templates

Use PyYAML + Jinja templating to simplify and speed up your configuration workflow

Aug 16, 2025

•

8 min read

Mastering timezones in Python with UTC

Mastering timezones in Python with UTC

This is the reason why you should use UTC for anything time-related.

Aug 13, 2025

•

7 min read

A Beginner’s Guide to Using OpenAI API with Python

A Beginner’s Guide to Using OpenAI API with Python

Learn how to connect Python to OpenAI's API and build smart workflows in minutes.

Aug 9, 2025

•

8 min read

Understanding Python's Context Managers

Understanding Python's Context Managers

Python Context Managers Tutorial: Prevent Resource Leaks and Database Connection Errors

Aug 6, 2025

•

6 min read

An Overview of Companies using the FastAPI and Django Python Web Frameworks

An Overview of Companies using the FastAPI and Django Python Web Frameworks

See which major tech players are using Python's top web frameworks: Django and FastAPI

Jul 30, 2025

•

8 min read

Why Python 3.14 GIL Update is Significant for Threading

Why Python 3.14 GIL Update is Significant for Threading

The GIL isn't a bottleneck anymore - threading is truly going threaded.

Jul 23, 2025

•

7 min read

An Introduction to t-strings in Python 3.14

An Introduction to t-strings in Python 3.14

New string formatter that brings security and structure to dynamic string composition.

Jul 19, 2025

•

7 min read

Securing your API keys and reading them using Python

Securing your API keys and reading them using Python

See how to store your secrets both locally and on cloud platforms like AWS, GCP, and Azure.

Jul 16, 2025

•

7 min read

Generative vs Discriminative AI in Python

Generative vs Discriminative AI in Python

Learn when to use Generative and Discriminative AI with practical Python examples.

Jul 9, 2025

•

7 min read

Faster String Slicing in NumPy

Faster String Slicing in NumPy

A new vectorized approach to slicing string arrays in NumPy, shown to be up to 25x faster!

Jul 2, 2025

•

6 min read

Running Shell Commands in Python (the right way)

Running Shell Commands in Python (the right way)

Leverage the subprocess module, but know there's a difference between subprocess.run() and subprocess.Popen()

Jun 25, 2025

•

5 min read

Using Python's LRU Cache

Using Python's LRU Cache

Caching your program's output can increase significantly. Using Python's functools.lru_cache decorator makes creating caches easy.

Jun 18, 2025

•

6 min read

Using pre-commit hooks for your Python project

Using pre-commit hooks for your Python project

We all forget to format, lint, and make sure print statements are removed.

Jun 11, 2025

•

7 min read

Python's match/case Statements: The Equivalent of Switch Statements

Python's match/case Statements: The Equivalent of Switch Statements

This feature, used in Python 3.10+, is an alternative to if/elif/else blocks. See how case and match statements are used.

Jun 4, 2025

•

5 min read

The Simplest Way to Understand The Difference Between For Loops and While Loops

The Simplest Way to Understand The Difference Between For Loops and While Loops

There's a major difference between for and while loops, and this explanation hits the key difference.

Mar 12, 2025

•

6 min read

A Cheat Sheet for Type Hinting in Python

A Cheat Sheet for Type Hinting in Python

Here's why you should be using type hinting for your python code - it's nothing but beneficial!

Feb 19, 2025

•

5 min read

The differences between Mutable and Immutable data types in Python

The differences between Mutable and Immutable data types in Python

A beginner-friendly guide to why some variables change behind your back (and others don't)

Feb 12, 2025

•

5 min read

Why Python doesn't have private methods

Why Python doesn't have private methods

Python relies on you to be trustworthy, but there's more to it.

Feb 5, 2025

•

5 min read

Python Won't Make You a Good Software Engineer

Python Won't Make You a Good Software Engineer

Here's 6 things that will make you a good engineer, no matter what languages you use.

Jan 29, 2025

•

5 min read

Python except: The Danger of Overgeneralizing Exceptions

Python except: The Danger of Overgeneralizing Exceptions

How catching every exception with ‘except’ in Python can break your code and hide critical errors.

Jan 22, 2025

•

6 min read

3 things I've learned in my career as a software engineer

3 things I've learned in my career as a software engineer

As someone who's considered "early career", here's 3 things I have learned.

Jan 16, 2025

•

7 min read

4 Python Click package extensions you need right now

4 Python Click package extensions you need right now

If you've ever built a CLI application using Click, don't overlook these extensions.

Jan 8, 2025

•

7 min read

Load more
background

Become a better software engineer today.

Newsletter

Login

Upgrade to Pro

Sample Issue

Advertise

Tools

Tutorials

Templates

Resources

Newsletter

Blog

Latest Posts

Experts

Creators

Most Popular

Resources

Support

Recommendations

Software Engineering Books

© 2025 Python Snacks.

Privacy policy

Terms of use

Powered by beehiiv